package com.tanhua.manager;


import com.tanhua.service.DashboardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/dashboard")
public class Dashboard {

    @Autowired
    private DashboardService dashboardService;


    @GetMapping(value = "/summary", name = "概要信息统计")
    public ResponseEntity summary() {

        return dashboardService.summary();
    }


    @GetMapping(value = "/users", name = "新增、活跃用户、次日留存率")
    public ResponseEntity users(Long sd, Long ed, String type) {
        //能接收到数据

        return dashboardService.findUsers(sd, ed, type);
    }


}
